package com.xjtu.platform.user.avatar.impl;

/**
 * @创建人 mby381
 * @创建时间 2021-12-17
 * @描述
 */

import com.xjtu.platform.common.CurrentUser;
import com.xjtu.platform.user.avatar.AvatarService;
import com.xjtu.platform.user.avatar.dao.AvatarDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;


@Service
@Transactional
public class AvatarServiceImpl implements AvatarService {

    @Resource
    private AvatarDao dao;

    @Override
    public void setAvatar(CurrentUser currentUser, String filename) {
        dao.setAvatar(currentUser.getUserId(),filename);
    }
}
